home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
10,000 Great Games
/
10,000 Great Games.iso
/
Product
/
66
/
data1.cab
/
Source_Files
/
Src
/
Pushable.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2000-01-16
|
500b
|
27 lines
#include "stdafx.h"
cPushable::cPushable(int _x, int _y, cProperties *_orig)
: cWeapon(_x, _y, _orig, "MOVING")
{
}
cPushable::~cPushable()
{
}
int cPushable::control()
{
cWeapon::control();
bounce_on_boundaries();
// Kill object when we hit something or go off screen
return !((abs(vx) > (fix)5 || !resting) && check_radial_hit_one(circle_bounds)) && !in_water();
}
void cPushable::hit(fix dir, cWeapon *w)
{
add_angular_speed(5 * w->push_power, dir);
}